import { tableServiceInterface } from "@/common/interface/table.interface";
import {
  $musicApkList,
  $musicApkDetail,
  $musicApkAdd,
  $musicApkUpdate,
  $musicApkDelete
} from "@/apis/apk/apk";
import {
  musicApkListInterface,
  musicApkAddInterface,
  musicApkUpdateInterface
} from "@/apis/apk/apk.interface";
export default class MusicApkService implements tableServiceInterface {
  async getTable(e: musicApkListInterface): Promise<any> {
    return $musicApkList(e);
  }
  deleteMultiple(e: Array<string>): Promise<any> {
    return $musicApkDelete(e);
  }
  edit(e: musicApkUpdateInterface): Promise<any> {
    return $musicApkUpdate(e);
  }
  add(e: musicApkAddInterface): Promise<any> {
    return $musicApkAdd(e);
  }
  detail(id: string): Promise<any> {
    return $musicApkDetail(id);
  }
  // 修改启用状态
  statusChange({ record, status }: { record: musicApkUpdateInterface, status: number }) {
    record.status = status;
    return $musicApkUpdate(record);
  }
}